module dll(
	//input
			clk_1m,
			clk_250k,
			rst_n,
			oe,
			check_over,
			crc_req,
			async_rxd,

	//output	
			frame_vaild,
			p_err,
			crc,
			mode,
			dout,
			rxd_fliter,
            data,
            data_val
);
input		clk_1m,
			clk_250k,
			rst_n,
			oe,
			check_over,
			crc_req,
			async_rxd;
output		frame_vaild,
			mode,
			p_err;
output	[7:0]	dout;
output	[15:0]	crc;
output          rxd_fliter;
output          data,
                data_val;

wire 		data_val,
			active,
			rxd,
			any_edge,
			active_clr,
			chk_cnt_clr,
			active_check,
			data,
			crc_oe,
			cnt_clr,
			dec_en,
			clk_250k,
			bit_incr;
wire        car_L2H;

wire	[5:0]	car_cnt;

dec U1(
			//input
			.clk_1m(clk_1m),
			.rst_n(rst_n),
			.oe(oe),
			.rxd(rxd),
			.mode(mode),
			.cnt(car_cnt),
			.active(active),
			.check_stage(active_check),
			.car_L2H(car_L2H),
			.any_edge(any_edge),
			//output
			.data_val(data_val),
			.cnt_clr(cnt_clr),
			.data(data),
			.dec_en(dec_en)
			);

dec_ctrl U2(
			//input
			.clk_1m(clk_1m),
			.rst_n(rst_n),
			.oe(oe),
			.active(active),
			.check_stage(active_check),
			.crc_req(crc_req),
			.mode(mode),
			.data_val(data_val),
			.din(data),
			//output	
			.frame_vaild(frame_vaild),
			.dout(dout),
			.crc_oe(crc_oe),
			.p_err(p_err)
			);

async_pass U3(//input
					.clk_1m(clk_1m),
					.clk_250k(clk_250k),
					.rst_n(rst_n),
					.oe(oe),
					.check_over(check_over),
					.async_rxd(async_rxd),
					.cnt(car_cnt),
					//output
					.active(active),
					.mode(mode),
					.active_check(active_check),
					.chk_cnt_clr(chk_cnt_clr),
					.any_edge(any_edge),
					.rxd(rxd),
					.rxd_fliter(rxd_fliter)
					);

count	U4(//input
			.clk_1m(clk_1m),
			.rst_n(rst_n),
			.oe(oe),
			.active_check(active_check),
			.chk_cnt_clr(chk_cnt_clr),
			.active(active),
			.dec_en(dec_en),
			.cnt_clr(cnt_clr),
			//output
			.car_L2H(car_L2H),
			.car_cnt(car_cnt)
				);

crc		U5(//input
			.clk(clk_1m),
			.rst_n(rst_n),
			.rst(crc_req),
			.oe(crc_oe),
			.din(data),
		   //output
		    .dout(crc)
			);
endmodule
